package com.tjsinfo.tjsoa.addresslist.action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import com.tjsinfo.tjsoa.addresslist.bo.IAddressListUserBo;

public class toInsertAddressListUserAction extends Action{
	private IAddressListUserBo listUserBo;
	public void setListUserBo(IAddressListUserBo listUserBo) {
		this.listUserBo = listUserBo;
	}
	public ActionForward execute(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response) {
		
		String group_id = request.getParameter("group_id");
		String moduleType = request.getParameter("moduleType");
		String userSort = "";
		if (moduleType.equals("0")) {
			userSort = listUserBo.getMaxUserSort(group_id);
			request.setAttribute("userSort", userSort);
		}

		request.setAttribute("group_id", group_id);
		request.setAttribute("moduleType", moduleType);
		return mapping.findForward("ok");
	}
}
